import Components from "unplugin-vue-components/vite";
import { ElementPlusResolver } from "unplugin-vue-components/resolvers";
import IconsResolver from "unplugin-icons/resolver"; // 自动导入图标组件

export default (path: any) => {
  return Components({
    resolvers: [
      // 自动导入 Element Plus 组件
      ElementPlusResolver(),
      // 自动导入图标组件
      IconsResolver()
    ],
    dts: path.resolve(__dirname, "../../src", "types", "components.d.ts")
  });
};
